package com.czh.subject.infra.basic.es;

import lombok.Data;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.search.fetch.subphase.highlight.HighlightBuilder;
import org.elasticsearch.search.sort.SortOrder;

/**
 * elasticsearch 请求类
 * @author caozaihui
 * @version 1.0
 * @since 2024/9/9 21:37
 */
@Data
public class EsSearchRequest {

    private BoolQueryBuilder boolQueryBuilder;

    private String[] fields;
    /**
     * 页码
     */
    private int from;
    /**
     * 页数
     */
    private int size;
    /**
     * 是否需要快照
     */
    private Boolean  needScroll;
    /**
     * 快照缓存时间
     */
    private Long minutes;
    /**
     * 排序依据
     */
    private String sortName;
    /**
     * 排序类型
     */
    private SortOrder sortOrder;
    /**
     * 高亮
     */
    private HighlightBuilder highlightBuilder;
}
